package com.isoft.entity;

import jakarta.xml.bind.annotation.*;
import lombok.Data;

@Data
@XmlRootElement(name = "MSG")
@XmlAccessorType(XmlAccessType.FIELD)
public class DfmeBoreEntity {
    @XmlElement(name = "META")
    private Meta meta;

    @XmlElement(name = "DFLT")
    private Dflt dflt;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Meta {
        @XmlElement(name = "sndr")
        private String sender;
        @XmlElement(name = "rcvr")
        private String receiver;
        @XmlElement(name = "seqn")
        private Long sequenceNumber;
        @XmlElement(name = "ddtm")
        private String dateTime;
        @XmlElement(name = "type")
        private String type;
        @XmlElement(name = "styp")
        private String subType;
        // 添加msgId字段用于接收自增ID
        private Long msgId;

        public String getDateTime() { return dateTime; }
        public void setDateTime(String dateTime) { this.dateTime = dateTime; }
        public Long getSequenceNumber() { return sequenceNumber; }
        public void setSequenceNumber(Long sequenceNumber) { this.sequenceNumber = sequenceNumber; }
        public String getType() { return type; }
        public void setType(String type) { this.type = type; }
        public String getSubType() { return subType; }
        public void setSubType(String subType) { this.subType = subType; }
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Dflt {
        @XmlElement(name = "flid")
        private Long flightId;
        @XmlElement(name = "ffid")
        private String flightFileId;
        @XmlElement(name = "fide")
        private String flightIdentifier;
        @XmlElement(name = "fatt")
        private String flightAttribute;
        @XmlElement(name = "stat")
        private String status;
        @XmlElement(name = "ista")
        private String internalStatus;
        @XmlElement(name = "msta")
        private String manualStatus;
        @XmlElement(name = "mist")
        private String manualInternalStatus;
        @XmlElement(name = "bort")
        private String boardingTime;
        @XmlElement(name = "mbor")
        private String manualBoardingTime;
        // 添加timeId字段用于接收自增ID
        private Long timeId;

        public Long getFlightId() { return flightId; }
        public void setFlightId(Long flightId) { this.flightId = flightId; }
        public String getBoardingTime() { return boardingTime; }
        public void setBoardingTime(String boardingTime) { this.boardingTime = boardingTime; }
    }

    public Meta getMeta() {
        return meta;
    }

    public void setMeta(Meta meta) {
        this.meta = meta;
    }

    public Dflt getDflt() {
        return dflt;
    }

    public void setDflt(Dflt dflt) {
        this.dflt = dflt;
    }
}